<template>
  <div>
    <h2 class="center">本期分红</h2>
    <div class="topCent">
      <div style="display: flex; align-items: center;">
        <span style="margin-right: 10px;">实发分红</span>
        <el-input-number :value="value" :controls="false" :min="0" class="num-input" style="width: 120px;" />
      </div>
      <div style="margin-left: 20px;">
        <span>应发分红</span>
        <span>$0</span>
      </div>
    </div>
    <div class="cont">
      <div class="items" v-for="(item, index) in fhList" :key="index">
        <h3>{{ item.venueTypeCode == 'ty' ? '体育' : item.venueTypeCode == 'zr' ? '真人' : item.venueTypeCode ==
          'dj' ? '电竞' : item.venueTypeCode == 'qp' ? '棋牌' : item.venueTypeCode == 'cp' ? "彩票" :
          item.venueTypeCode == 'by' ? "捕鱼" : item.venueTypeCode == 'dz' ? "电子" : item.venueTypeCode == 'dz' ? "德州" :
          item.venueTypeCode == 'qkl' ? "区块链" : '' }}</h3>
        <div class="items_cont">
          <div>
            <p>应发金额</p>
            <p>{{ item.amount }}$</p>
          </div>
          <div style="margin: 0 10px;">
            =
          </div>
          <div>
            <p>有效投注</p>
            <p>
              <el-input-number :value="item.validBetAmount" :controls="false" :min="0" class="num-input" />
            </p>
          </div>
          <div style="margin: 0 10px;">
            X
          </div>
          <div>
            <p>分红比例</p>
            <p>
              <el-input-number :value="item.rate" :controls="false" :min="0" class="num-input" />%
            </p>
          </div>
          <div style="margin: 0 10px;">
            X
          </div>
          <div>
            <p>平台占成比例</p>
            <p>
              <el-input-number :value="item.platRate" :controls="false" :min="0" class="num-input" />%
            </p>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import FormItem from './formItem.vue'
export default {
  components: {
    FormItem
  },
  props: {
    fhList: {
      type: Object,
      default: []
    },
    fhInfo: {
      type: Object,
      default: {}
    }
  },
  data() {
    return {
      value: 0
    };
  },
}
</script>

<style lang='scss' scoped>
.center {
  text-align: center;
}

.topCent {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cont {
  display: flex;
  width: 100%;
  flex-wrap: wrap;

  .items {
    width: 49%;
    height: 200px;
    padding: 20px 30px;
    border-radius: 5px;
    border: 1px solid #ccc;
    margin: 5px;

    .items_cont {
      display: flex;
      align-items: center;

      .num-input {
        width: 100px;
      }
    }
  }
}
</style>
